package cn.fyg.service.finance.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import cn.fyg.common.base.retv.Retv;
import cn.fyg.service.finance.domain.deposit.DepositDto;
import cn.fyg.service.finance.domain.deposit.DepositPjct;
import cn.fyg.service.finance.domain.deposit.DepositService;

@RestController
@RequestMapping("deposit")
public class DepositController {
	@Autowired
	private DepositService depositService;
	
	@PostMapping(value = "/")
	public Retv<DepositDto> getDepositlist(@RequestParam("accountnumber") String accountnumber) {
		return this.depositService.getDepositlist(accountnumber);
	}
	
	@PostMapping(value = "/detail")
	public Retv<DepositPjct> getDepositdetail(@RequestParam("projectnumber") String projectnumber){
		return this.depositService.getDepositdetail(projectnumber);
	}
	
	@PostMapping(value = "/project")
	public Retv<DepositPjct> getDepositProject(@RequestParam("accountnumber") String accountnumber, @RequestParam("amountType") String amountType) {
		return this.depositService.getDepositProject(accountnumber, amountType);
	}
	
	@PostMapping(value = "/test")
	public String test() {
		return this.depositService.test();
	}
}
